import sympy as sym

x=sym.Symbol('x')
fx=2*x+1
print(type(fx))
print(fx.evalf(subs={x:2}))

x,y=sym.symbols('x,y')
f=2*x+y
print(f.evalf(subs={x:1,y:2}))
print(f.subs([(x,1),(y,2)]))
print(f.subs(dict(x=1,y=2)))
print(f.evalf(subs={x:1}))
print(f.subs(x,1))
print(f.subs(dict(x=1)))
